﻿<%@ Page Language="C#" MasterPageFile="~/Admin/AdminMasterPage.master" AutoEventWireup="true"
    CodeFile="UpdateProviderLogo.aspx.cs" Inherits="Admin_provider_UpdateProviderLogo"
    Title="Company Logo" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
    <div class="contents">
        <table width="100%" cellpadding="3" cellspacing="0" border="0">
            <tr>
                <td colspan="2">
                    <h1>Update Company Logo</h1>
                </td>
            </tr>
            <tr>
                <td style="width: 30%";>
                    Provider Company Name
                </td>
                <td>
                    <asp:DropDownList ID="ddlProviderCompanyName" runat="server" AutoPostBack="True"
                        OnSelectedIndexChanged="ddlProviderCompanyName_SelectedIndexChanged">
                    </asp:DropDownList>
                    <asp:RequiredFieldValidator ID="rfvProviderCompanyName" runat="server" ErrorMessage="Choose Provider Company"
                        ControlToValidate="ddlProviderCompanyName" ValidationGroup="uploadlogo" InitialValue="-1"></asp:RequiredFieldValidator>
                </td>
            </tr>
            <tr>
                <td>
                    &nbsp;
                </td>
                <td>
                    <asp:Image ID="imgCompanyLogo" ImageUrl="~/captcha/new_company_logo.GIF" runat="server" />
                </td>
            </tr>
            <tr>
                <td>
                    Serverl Url:
                </td>
                <td>
                    <asp:Label ID="lblServerUrl" runat="server" Text="None"></asp:Label>
                </td>
            </tr>
            <tr>
                <td>
                    Upload New Company Logo
                </td>
                <td>
                    <div id="divFileName" style="display: none">
                        <asp:TextBox ID="txtLogoFilePath" runat="server"></asp:TextBox></div>
                    <input id="fleUpload" style="width: 350;" runat="server" type="file" />
                </td>
            </tr>
            <tr>
                <td>
                    &nbsp;
                </td>
                <td>
                    <asp:Button ID="btnSubmit" ValidationGroup="uploadlogo" runat="server" OnClick="btnSubmit_Click"
                        Text="Submit"  CssClass="btn blue" />
                    <asp:Button ID="btnUpdateScrollingLogo" runat="server" Text="Manage Scrolling Company Logo"
                        CausesValidation="false" OnClick="btnUpdateScrollingLogo_Click"  CssClass="btn blue" />
                </td>
            </tr>
            <tr>
                <td>
                    &nbsp;
                </td>
                <td>
                    <asp:Label runat="server" ID="lblMessage" />
                </td>
            </tr>
        </table>

        <script type="text/javascript">
        function SetFileName()
        {
            //var prefix = getCrtlPrefix();
            var CtrlFileUp = document.getElementById('fleUpload');
            //alert(CtrlFileUp.value);
            //var lblPath = document.getElementById(prefix + 'lblFilePath');
            var txtPath = document.getElementById('<%=txtLogoFilePath.ClientID%>');
            alert(CtrlFileUp.innerHTML);
            //alert(lblPath.value);
            txtPath.value = CtrlFileUp.value;
            //lblPath.innerHTML = CtrlFileUp.value;
        }
        </script>
    </div>
</asp:Content>
